EMT Practice Test

1. Question Content...


Question List

Question1: Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Select two answers)

Question2: Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers) string = 'python' [::2] string = string[-1] + string[-2]

Question3: What is true about Python packages? (Select two answers)

Question4: What is the expected behavior of the following code?

Question5: Which of the following snippets will execute without raising any unhandled exceptions? (Select answers) A)

B)

C)

D)

Question6: Which of the following statement are true? (Select two answers)

Question7: You are going to read 16 bytes from a binary file into a bytearray called dat a. Which lines would you use? (Select two answers)

Question8: What can you do if you don't like a long package path like this one?

Question9: What is a true about python class constructors? (Select two answers)

Question10: Which of the following expression evaluate to True? (Select two answers) A)

B)

C)

D)

Question11: What is the expected out of the following code of the file named zero_length_existing_file is a zero-length file located inside the working directory?

Question12: What is the expected behavior of the following code?

Question13: What is the expected output of the following code?

Question14: Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Select two answers)

Question15: What is the expected output of the following snippet?

Question16: What is the expected behavior of the following code?

Question17: Which of the following expressions evaluate to True? (Select two answers)

Question18: What will be the value of the i variable when the while e loop finishes its execution?

Question19: What is the expected output of the following code?

Question20: What is the output of the following piece of code?

Question21: Which of the following statements are true? {Select two answers)

Question22: Assuming that the following code has been executed successfully, selected the expression which evaluate to True (Select two answers)

Question23: Which of the following statements are true? (Select two answers)

Question24: What is the expected behavior of the following code?
x = 8 ** (1/3)
y = 2. if x < 2.3 else 3.
print(y)

Question25: There is a stream named s open for writing. What option will you select to write a line to the stream''

Question26: Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Choose two.)

Question27: Which of the listed actions can be applied to the following tuple? (Select two answers)

Question28: A compiler is a program designed to (select two answers)

Question29: What is the expected output of the following snippet?

Question30: The first parameter of each method:

Question31: With regards to the directory structure below, select the proper forms of the directives in order to import module_ a. (Select two answers)

Question32: A Python module named pymod, py contains a function named pyfun ( ).
Which of the following snippets will let you invoke the function? (Select two answers)

Question33: Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)

Question34: Assuming that the math module has been successfully imported, which of the following expressions evaluate to True? (Select two answers)

Question35: Is it possible to safely check if a class/object has a certain attribute?

Question36: How many elements will the list1 list contain after execution of the following snippet?

Question37: What is the expected behavior of the following code?

Question38: What is the expected output of the following code?

Question39: Which of the following statements are true? {Select two answers)

Question40: An operator able to perform bitwise shifts is coded as (select two answers)

Question41: Which of the following words can be used as a variable name? (Select two valid names)

Question42: Which of the following statements are true? (Select two answers)

Question43: Which of the following expressions evaluate to True? (Select two answers)

Question44: What is the expected output of the following snippet?

Question45: Select the valid fun () invocations:
(select two answers)
def fun (a, b=0):
return a*b